package org.example.test.response;

import java.io.Serializable;

/**
 * @author chiyan
 *
 */
@SuppressWarnings("serial")
public class CommonResponse<T> implements Serializable {

	public String code;

	public String msg;

	public T data;


	public CommonResponse() {
	}

	public CommonResponse(String code,String msg,T data) {
		super();
		this.code = code;
		this.msg = msg;
		this.data = data;
	}
	public CommonResponse(String code) {
		this.code = code;
	}

	/**
	 * @param code
	 * @param data
	 */
	public CommonResponse(String code, T data) {
		super();
		this.code = code;
		this.data = data;
	}

	/**
	 * @param code
	 * @param msg
	 */
	public CommonResponse(String code, String msg) {
		super();
		this.code = code;
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "CommonResponse [code=" + this.code + ", msg=" + this.msg + ", data=" + this.data + "]";
	}

}
